SQL prepare failed: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE rel_id='' AND usergroup='75'' at line 1 ) Query: SELECT id FROM WHERE rel_id='' AND usergroup='75' (500 Internal Server Error)

Symfony Exception

SQL prepare failed: Array
(
[0] => 42000
[1] => 1064
[2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE rel_id='' AND usergroup='75'' at line 1
)
Query: SELECT id FROM WHERE rel_id='' AND usergroup='75'

Exception

Exception

  1.     $sqldata "SELECT $field FROM $table $where";
  2.     $sth $dbh->prepare($sqldata);
  3.     dev_debug("Pull_field:" $sqldata);
  4.     if ($sth === false) {
  5.         $errorInfo $dbh->errorInfo();
  6.         throw new Exception("SQL prepare failed: " print_r($errorInfotrue) . " Query: $sqldata");
  7.     }
  8.     $sth->execute();
  9.     return $sth->fetchColumn();
  10. }
  1. echo '<div class="text-center">';     // container
  2. // SELECT ALL SUBMIT BUTTON
  3. // check if a record has been set
  4. $rec_button_activate pull_field($page_table"id""WHERE rel_id='$rec_link' AND usergroup='$_SESSION[usergroup]'");
  5. $submitted false;
  6. // check if submited already
  7. if ($appli_submited_check == '0' || $page_id == '8' || $_SESSION['uid'] == '' || $cms_save_action == 'yes' || $cms_page_name == 'media-upload' || $cms_page_name == 'college_challenge') {
  8.     $but_name "Submit";
include('/var/www/vhosts/heiapply.co.uk/httpdocs/forms_eoi.php') in /var/www/vhosts/heiapply.co.uk/httpdocs/eoi_form.php (line 147)
  1.     $kill_proceed_button='1';
  2.     $button_name 'Submit Your Form';
  3.     
  4.     $file_name "forms_eoi.php";
  5.     if(file_exists($file_name)){
  6.         include($file_name);
  7.     }else{
  8.         echo "file does not exist";
  9.     }
  10.     ?>
  11. </div>

Stack Trace

Exception
Exception:
SQL prepare failed: Array
(
    [0] => 42000
    [1] => 1064
    [2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE rel_id='' AND usergroup='75'' at line 1
)
 Query: SELECT id FROM  WHERE rel_id='' AND usergroup='75'

  at /var/www/vhosts/heiapply.co.uk/httpdocs/engine/admin/inc/lib.inc.php:1866
  at pull_field()
     (/var/www/vhosts/heiapply.co.uk/httpdocs/forms_eoi.php:976)
  at include('/var/www/vhosts/heiapply.co.uk/httpdocs/forms_eoi.php')
     (/var/www/vhosts/heiapply.co.uk/httpdocs/eoi_form.php:147)